<template>
  <el-select v-model="value" :size="size" placeholder="select" @change="$emit('getSelectVal', value)">
      <el-option
        v-for="item in options"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      ></el-option>
  </el-select>
</template>

<script>
export default {
  name: 'Select',
  data() {
    return {
      value: ''
    }
  },
  props: {
    options: {},
    size: {
      type: String,
      default: 'medium'
    }
  },
  computed: {
    
  },
  created: function(){
    
  },
  mounted () {
    if (this.options && this.options.length != 0) {
      this.value = this.options[0].value
    }
  }
}
</script>

<style lang="scss" scoped>
.el-select{
    width: 224px;
}
.el-input__inner{
    height: 34px;
    line-height: 34px;
}
.xy-select .el-select{
  width: 224px;
}
</style>
